using UnityEditor;
using UnityEngine;

namespace QFramework.Framework.Util
{
    /**
     * 编辑器工具
     */
    public class EditorUtil
    {
#if UNITY_EDITOR
        public static void CallMenuItem(string menuPath)
        {
            EditorApplication.ExecuteMenuItem(menuPath);
        }

        public static void OpenInFolder(string folderPath)
        {
            Application.OpenURL("file:///" + folderPath);
        }

        public static void ExportPackage(string assetPathName, string fileName)
        {
            AssetDatabase.ExportPackage(assetPathName, fileName, ExportPackageOptions.Recurse);
        }
#endif
    }
}